<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>用户管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
	var WEBROOT={};
	WEBROOT.ctx="${pageContext.request.contextPath}${fns:getAdminPath()}";
	WEBROOT.ctxStatic="${pageContext.request.contextPath}"+"/static";
		function page(n,s){
			if(n) $("#pageNo").val(n);
			if(s) $("#pageSize").val(s);
			$("#searchForm").attr("action","${ctx}/sys/statistics/userlist");
			$("#searchForm").submit();
	    	return false;
	    }
		$(function(){
			$(".name").click(function(){
				var chosedUser=$(this).html();
				$(window.parent.document).find("#target_title").text(chosedUser+"（个人）统计数据");
				$(window.parent.document).find("#target_title").attr("data-user-id",$(this).data("id"));
				$(window.parent.document).find("#target_title").attr("data-office-oruser","user");
				//查询统计数据
				var rangeType;
				$(window.parent.document).find(".charts-choose-range").each(function(index){
			           if($(this).hasClass("active")){
			        	   rangeType=$(this).data("range");
			           }
			    }) 
			    $(window.parent.document).find("#officeContentHidden").click();
			});
		});
	</script>
	<style type="text/css">
	.name{color: #2fa4e7;text-decoration: none;}
	.name:HOVER{cursor: pointer;text-decoration: underline;}
	</style>
</head>
<body>
<form:form id="searchForm" modelAttribute="user" action="${ctx}/sys/statistics/userlist" method="post" class="breadcrumb form-search ">
		<input id="officeId" name="office.id" type="hidden" value="${office.id}"/>
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
</form:form>
		<div style="min-height: 400px">
		<table id="contentTable"  class="table table-striped table-bordered table-condensed">
			<tbody>
			<c:if test="${empty page.list}"><tr><td><a href="#">该部门下无用户</a></td></c:if>  
			<c:forEach items="${page.list}" var="user">
				<tr style="height: 10px">
					<td ><span class="name" data-id="${user.id}" >${user.name}</span></td>
					<td><a href="#">${user.office.name}</a></td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
		</div>
	
	<div class="pagination">${page}</div>
</body>
</html>